Suspect Links and deletion and read info

Hello,

I'm new to DXL in terms of suspect links. Here is what I would like to do I have module A and a clone of A called B with one-to-One links connected via two Link Modules called child2parent and parent2child. Module is then updated once cloned to incorporate that project requirements. Tthe idea is to then do a blanket delete based on user and timestamp so that the user doesn't remove all suspect within the object. See below for my logic. Questions when you create or delete a link it creates a suspect link but within the "details" it state that info can be read/displayed. Why is this and what other type of actions cause this to happen?
 

string TodayChange = null
 
void ClearSuspicions(Object obj)
{
    Date td = null
        string LastChangeLoc = null
        
        Link lnk
    for lnk in obj <-"*" do {  
                if (name(module(lnk)) != "child2parent" && name(module(lnk)) != "parent2child") continue
                
                td = obj."Last Modified On"
                LastChangeLoc = probeAttr_(lnk,"Last Modified By") "\t" dateOnly(td)""
                
                if(LastChangeLoc == TodayChange){lnk."Suspicion Cleared Forwards" = dateAndTime(today())}
        }
        
    for lnk in obj ->"*" do {  
                if (name(module(lnk)) != "child2parent" && name(module(lnk)) != "parent2child") continue
        
                td = obj."Last Modified On"   
                LastChangeLoc = probeAttr_(lnk,"Last Modified By") "\t" dateOnly(td)""
                if(LastChangeLoc == TodayChange){lnk."Suspicion Cleared Backwards" = dateAndTime(today())}
        }
}
 
void ClearOutgoingSuspicions(Object obj)
{
        Link lnk = null
        ModName_ targetMod = null
    for lnk in obj ->"*" do {  
                if (name(module(lnk)) != "child2parent" && name(module(lnk)) != "parent2child") continue
                targetMod = target lnk
                Module mod = edit(fullName(targetMod), true,true)
                if (null mod){errorBox("{Null} " fullName(targetMod))}else{ClearSuspicions(target lnk)}
        }
}
 
bool FindMostRecentChangeByCurrentUser(Object obj) 
{
        bool ret = true
        
        User u = find()
        string uName = u.name
        
        Date td = obj."Last Modified On"
        string LastChange = probeAttr_(obj,"Last Modified By") "\t" dateOnly(td)""
        
        td = today()
        TodayChange = uName "\t" dateOnly(td)""
        
        if(LastChange != TodayChange){ret = false}
 
        return ret
} 
 
void main(Object cObj)
{
        if(FindMostRecentChangeByCurrentUser(cObj)){ClearOutgoingSuspicions(cObj)}
}
 
main(current Object)

SystemAdmin - Thu May 17 13:06:58 EDT 2012

Re: Suspect Links and deletion and read info
Mathias Mamsch - Fri May 18 07:35:22 EDT 2012

Hi,

I am not sure I understand your problem, but there is several things that seem weird to me. The first is, than in my experience when you create a link, it will normally NOT be suspicious (in fact it would make no sense to make it suspicious. The user probably created it for a reason). The logic for determining a suspect link is as far as I know:
  • If the link points to a baseline it cannot be suspect.
  • If the link has a "Suspicion Cleared XY" attribute set, then use this date, otherwise use the creation time of the link as the suspicion date.
  • Compare the suspicion date to the last modification time of the target/source object of the link. If the object was modified after the suspicion date, then the link is suspicious.

The second thing is, that you might have the attributes "Suspicion Cleared Forwards" and "Suspicions Cleared Backwards" mixed up. "Suspicion Cleared Forwards" is as far as I know for outlinks, however you seem to set it for the in-links.

The third thing is, that you should use lastModifiedTime() to determine the last modification date of stuff.
Mathias Mamsch, IT-QBase GmbH, Consultant for Requirement Engineering and D00RS

Re: Suspect Links and deletion and read info
SystemAdmin - Tue Jun 05 08:18:46 EDT 2012

Hello,

the following version of DOORS 9.3.0.7 does create a suspect link on the creation of links. Question is there and easy way on dumping the suspect links to a report prior to clearing them? I would like to have the ablitiy to create a report having the redline diff like in the GUI prior to clearing the suspect links. Thank you.

-Jim